#ifndef NETWORKPLAYER_H
#define NETWORKPLAYER_H

#include "Player.h"
#include "Card.h"
#include "Hand.h"


//class created by CP Botha
/*!
 * \brief The NetworkPlayer class is used by game master to create four network players to connect to the game master/server
 */
class NetworkPlayer:public Player
{
public:
    /*!
    * \brief NetworkPlayer constructor for network player class
    * \param Hand containing player's hand
    * \param int of player id
    * \param pointer to game gui
    * \param pointer to server
    */
   NetworkPlayer(Hand, int, game* g,Server* );
   /*!
    * \brief getMove request player to return a move, player ask network for a move
    * \return Card object containing the player's move
    */
   Card getMove(bool);
   /*!
    * \brief getBid ask player to return a bid, player asks network for bid
    * \return QStringList containing bid information
    */
   QStringList getBid();
   /*!
    * \brief sendBid send the last bid made to the player
    */
   void sendBid(QStringList,int);//send player the last bid
   /*!
    * \brief sendMove send player the last move made
    * \param Card the card that was player
    */
  void sendMove(Card,QString);//send player last card played
  /*!
    * \brief moveInvalid alert player that move was invalid
    */
   void moveInvalid();
   /*!
    * \brief bidInvalid alert player that bid was invalid
    */
   void bidInvalid();
   /*!
    * \brief startDealing alert player that dealing is started
    */
   void startDealing();
   /*!
    * \brief startRedealing alert player that redealing is started
    */
   void startRedealing();
   /*!
    * \brief startBidding alert player that bidding is started
    */
   void startBidding();
   /*!
    * \brief startPlay alert player that play is started
    */
   void startPlay();
   /*!
    * \brief RubberDone
    */
   void RubberDone();
   /*!
    * \brief sendTrickWinner alert player of the trick winner
    */
   void sendTrickWinner(QString team, QString player);
   /*!
    * \brief sendContract send player the winning contract
    */
   void sendContract(QStringList);
   /*!
    * \brief sendDummy tell the player who the dummy is
    */
   void sendDummyId(string);
   /*!
    * \brief sendDummyCards send player the dummy hand
    */
   void sendDummyCards(Hand);
   /*!
    * \brief sendHand send the player's hand out with the network
    */
   void sendHand();
   /*!
    * \brief sendGameStatus send out a game status update with the network
    */
   void sendGameStatus(QStringList);
   /*!
    * \brief updateScore send out score update with the network
    */
   void updateScore(QString, QString, QString, QString);
   /*!
    * \brief sendRubberWinner sends a won_update message on the network with a note of 'rubber'.
    */
   void sendRubberWinner(QString);
   /*!
    * \brief sendGameWinner sends a won_update message on the network with a note of 'team'.
    */
   void sendGameWinner(QString);

private:
   int network_delay;
   int retry_limit;

};

#endif // NETWORKPLAYER_H
